#ifndef _ADC_H_
#define _ADC_H_

#include "stdint.h"

/*
   PF6  - 0: 
   PF7  - 1: 
   PF8  - 2: LIGHT SENSOR
   PF9  - 3: PH SENSOR
   PF10 - 4: WATER SENSOR
*/

#define ADC_CHANNEL_COUNT         5

int adc_init();
int get_adc_values(uint16_t *avg_value);

static int get_ph_value(uint16_t *avg_value)
{
  return avg_value[3]*5.0/1024/6;
}

static int get_light_value(uint16_t *avg_value)
{
  return avg_value[2];
}


#endif
